import { createRouter, createWebHistory } from 'vue-router'
// 导入组件
import Props from '@/views/props/index.vue'
import FatherToSonFather from '@/views/props/father-to-son/Father.vue'
import SonToFatherFather from '@/views/props/son-to-father/Father.vue'
import BrotherToBrotherFather from '@/views/props/brother-to-brother/Father.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/props', 
      component: Props,
      children: [
        {path: 'father-to-son', component: FatherToSonFather, name: 'father-to-son'},
        {path: 'son-to-father', component: SonToFatherFather, name: 'son-to-father'},
        {path: 'brother-to-brother', component: BrotherToBrotherFather, name: 'brother-to-brother'},
      ]
    }
  ]
})

export default router
